# @Time : 2020/9/9 15:58
# @Author : Fioman 
# @Phone : 13149920693
import cv2 as cv
import numpy as np

srcTarget = cv.imread("match01.png")
height, width = srcTarget.shape[:2]
centerX, centerY = width // 2, height // 2

for i in range(2, 12):
    fileName = "match0{}.png".format(i)
    angle = np.random.randint(-10, 10)
    M = cv.getRotationMatrix2D((centerX, centerY), angle, 1.0)
    newTarget = cv.warpAffine(srcTarget, M, (width, height))
    srcTarget = newTarget
    cv.imwrite(fileName, newTarget)
